﻿using CateringCommon;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Food.Web.PlatForm
{
    public partial class Login1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request.Form.Count > 0)
                {
                    string userName = Request.Form.Get("UserName");
                    string userPwd = Request.Form.Get("UserPwd");
                    if (userName != null && userPwd != null)
                    {
                        string token = Common.GetUserToken(userName, userPwd);

                        Session["UserName"] = userName;
                        Session["UserToken"] = token;
                    }                    
                }
            }
        }      
    }
}